// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

/**
 * Enum for road mark line rules.
 */
enum class FWorldRoadMarkLineRule
{
	None,
	Caution,
	NoPassing
};

inline FWorldRoadMarkLineRule FWorldRoadMarkLineRuleFromJson(const json& j)
{
	if (j == "none")		return FWorldRoadMarkLineRule::None;
	if (j == "caution")		return FWorldRoadMarkLineRule::Caution;
	if (j == "no passing")	return FWorldRoadMarkLineRule::NoPassing;
	return FWorldRoadMarkLineRule::None;
}

inline json FWorldRoadMarkLineRuleToJson(FWorldRoadMarkLineRule p)
{
	if (p == FWorldRoadMarkLineRule::None)		return "none";
	if (p == FWorldRoadMarkLineRule::Caution)	return "caution";
	if (p == FWorldRoadMarkLineRule::NoPassing)	return "no passing";
	return "none";
}

inline void from_json(const json& j, FWorldRoadMarkLineRule& p)
{
	p = FWorldRoadMarkLineRuleFromJson(j);
}

inline void to_json(json& j, const FWorldRoadMarkLineRule& p)
{
	j = FWorldRoadMarkLineRuleToJson(p);
}
